home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 25
/
CU Amiga Magazine's Super CD-ROM 25 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-08].iso
/
CUCD
/
WWW
/
http
/
www.wirenet.co.uk
/
files
/
thor25_arexx.lha
/
FSE
/
ASCIIPic.fse
next >
Wrap
Text File
|
1996-10-26
|
1KB
|
48 lines
/* ASCIIPic.fse by Troels Walsted Hansen
** $VER: ASCIIPic.fse v1.02 (03.12.94)
**
** Convert picture to ASCII and include it in the FSE. Uses
** 'ilbm2ascii' v1.4 by Tobias Ferber.
*/
defpath = 'work:pictures/' /* Edit to suit your environment */
options results
/* needs THOR and FSE functions */
if(substr(address(),1,8) ~= "THOR_FSE") then
do
say "This script should only be started from inside the FSE."
exit 20
end
else fseport = address()
p = ' ' || address() || ' ' || show('P',,)
thorport = pos(' THOR.',p)
if thorport > 0 then thorport = word(substr(p,thorport+1),1)
else
do
say 'No THOR port found!'
exit 10
end
address(thorport)
REQUESTFILE TITLE '"Select ILBM to convert and include:"' ID '"'defpath'"' FP PAT '"#?"'
if(rc ~= 0) then exit
else picfile = result
lastchar = right(picfile,1)
if(rc~=0|lastchar = "/"|lastchar = ":"|picfile = "") then exit
address command "ilbm2ascii "||'"'picfile'"'||" > t:FSEASCIIPicture"
address(fseport)
INCLUDEFILE 't:FSEASCIIPicture'
address command "delete >nil: t:FSEASCIIPicture"
exit